<?php
include_once('connection/connection.php');
$frm=$_POST['frmId'];
if(isset($_POST['tanker_info']))
{
$tankId=$_POST['tankId'];
$tank_no=$_POST['tank_no'];
$water_supply=$_POST['qty'];
$area_covered=$_POST['area'];

 $qr="update tbl_dtls_q2_tanker set total_tanker_no='$tank_no',water_quantity='$water_supply',area_covered='$area_covered' , to_date= '$_REQUEST[firstinput]', from_date = '$_REQUEST[secondinput]' where id='$tankId'";
$res=mysql_query($qr);

$qryHistory="insert into tbl_new_user_history(user_id,form_id,action_id,ip_address,modify_date,user_type,user_name) values('$_POST[loginId]','$frm','113','$_SERVER[REMOTE_ADDR]',NOW(),'$_POST[userType]','$_POST[name]')";
mysql_query($qryHistory);

if($res)
{
header("location:q2.php");
}
}
?>
